package com.finalproject.ui;
/**
 * Main Application for the Final Project
 */
import java.awt.Color;
import java.awt.GridLayout;
import java.awt.event.KeyEvent;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JTabbedPane;
public class UIDemoMain extends JPanel {
	
		/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

		private UICafeTabPanel uiCafeTabPanel;
		
		private UIVendingMachineTabPanel uiVendingMachineTabPanel;
	
		private UIDietaryProfileTabPanel uiDietaryProfileTabPanel;
		
		private UIExpenseProfileTabPanel uiExpenseProfileTabPanel;
	
		public UIDemoMain() {
			super(new GridLayout(1, 1));
	         
	        JTabbedPane tabbedPane = new JTabbedPane();
	        
	        uiExpenseProfileTabPanel = new UIExpenseProfileTabPanel();
	        tabbedPane.addTab("My Expense Profiles", uiExpenseProfileTabPanel);
	        tabbedPane.setMnemonicAt(0, KeyEvent.VK_1);
	        
	        
	        
	        uiDietaryProfileTabPanel = new UIDietaryProfileTabPanel();
	        tabbedPane.addTab("My Dietary Profiles", uiDietaryProfileTabPanel);
	        tabbedPane.setMnemonicAt(0, KeyEvent.VK_2);
	        
	        uiVendingMachineTabPanel = new UIVendingMachineTabPanel();
	        tabbedPane.addTab("VendingMachines", uiVendingMachineTabPanel);
	        tabbedPane.setMnemonicAt(1, KeyEvent.VK_3);
	         
	        
	        uiCafeTabPanel = new UICafeTabPanel();
	        tabbedPane.addTab("Cafes", uiCafeTabPanel);
	        tabbedPane.setMnemonicAt(1, KeyEvent.VK_4);
	         
	        
	        //Add the tabbed pane to this panel.
	        add(tabbedPane);
	         
	        //The following line enables to use scrolling tabs.
	        tabbedPane.setTabLayoutPolicy(JTabbedPane.SCROLL_TAB_LAYOUT);
		}
	
	
	
	public static void main(String[] args) {
		JFrame f = new JFrame("CafeVendingMachine Simulator");
		f.setBackground(Color.white);
		 f.setDefaultCloseOperation(2);
	      f.getContentPane().add(new UIDemoMain());
	      f.pack();
	      f.repaint();
	      f.setSize(1150,800);

	      f.setVisible(true);
	}

}
